<div class="AdminPages-list-widget">
	<h1>{{!Pages}}</h1>
	{{include "controllers/adminpanel/AdminPages/index_recurse_helper"}}
</div>
<div class="pages-edit-links">
	<h1>{{!Options}}</h1>
	<input type="button" value="{{!Create}}" id="pages-new"/>
</div>
<div style="clear: both;"></div>
<script>
$(".AdminPages-list").sortable({
	stop: function(event,ui) {
		$.ajax({type: "POST", url: "/admin-AdminPages/",data: {ajaj:1,mode: "reorder", pages: $(this).sortable('toArray').join(",")}});
		$("#debug").text("STOP, pages="+ $(this).sortable('toArray').join(","));
	}
});
$("#pages-new").button({});
$("#pages-new").click(function() {document.location='{{action}}?mode=edit';});
</script>
